package com.fxg.demo;

import org.junit.Test;

public class TestDemo {

    /**
     * 测试超卖小程序
     */
    @Test
    public void superMarket () throws Exception {
        MarketWrong marketWrong = new MarketWrong();
        // 这次就卖500件吧
        marketWrong.setGoodsLen(500);
        marketWrong.superMarket();
        Thread.sleep(60000); // 卖一分钟
    }

    /**
     * 测试正常买卖小程序
     */
    @Test
    public void superMarketCorrect () throws Exception {
        MarketCorrect market = new MarketCorrect();
        // 这次就卖500件吧
        market.setGoodsLen(500);
        market.superMarket();
        Thread.sleep(60000); // 卖一分钟
    }



}
